<extend name="Public/header" />
<block name="main">
    <div class="col-lg-10">
        <div class="panel panel-default">
            <div class="panel-heading">
                Basic Form Elements
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-lg-8">
                        <form role="form" action="" method="post" enctype="multipart/form-data">
                            <div class="form-group">
                                <label>所属上级</label>
                                <select name="pid" class="form-control">
                                    <option value="0">顶级分类</option>
                                    <foreach name="list" item="val">
                                        <option value="{$val.id}">{:str_repeat('&nbsp;&nbsp;&nbsp;',(count(explode(',',$val['path']))-1))}{$val.name}</option>
                                    </foreach>
                                </select>
                            </div>
                            <div class="form-group">
                                <label>分类名称</label>
                                <input class="form-control" name="name" placeholder="分类名称">
                            </div>
                            <div class="form-group">
                                <label>分类图片</label>
                                <input type="file" name="img">
                            </div>
                            <div class="form-group">
                                <label>是否启用</label>
                                <select name="state" class="form-control">
                                    <option value="1">启用</option>
                                    <option value="2">隐藏</option>
                                </select>
                            </div>
                            <button type="submit" class="btn btn-default">Submit Button</button>
                            <button type="reset" class="btn btn-default">Reset Button</button>
                        </form>
                    </div>
                    <!-- /.col-lg-6 (nested) -->

                    <!-- /.col-lg-6 (nested) -->
                </div>
                <!-- /.row (nested) -->
            </div>
            <!-- /.panel-body -->
        </div>
        <!-- /.panel -->
    </div>
</block>